﻿# NodeMatrix项目 - 可执行文件
project(NodeMatrix)

get_source_list(SOURCE_LIST)
get_header_list(HEADER_LIST)

# 添加头文件目录
include_directories(include)
# 包含OSG头文件
include_directories(${OSG_INCLUDE_DIR})

# 创建静态库
add_library(${PROJECT_NAME} STATIC ${SOURCE_LIST} ${HEADER_LIST})

# 设置库的公共头文件目录
# 这样任何链接此库的目标都会自动包含这个目录
target_include_directories(NodeMatrix PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
    # 如果将来要安装，可以添加INSTALL_INTERFACE
)

# add_executable(NodeMatrix ${MATRIX_SOURCES} ${MATRIX_HEADERS})

target_link_libraries(
    NodeMatrix 
    debug ${OSG_LIB_DIR_DEBUG}/osgd.lib
    debug ${OSG_LIB_DIR_DEBUG}/osgGAd.lib
    debug ${OSG_LIB_DIR_DEBUG}/osgDBd.lib
    debug ${OSG_LIB_DIR_DEBUG}/openThreadsd.lib
    debug ${OSG_LIB_DIR_DEBUG}/osgManipulatord.lib
    debug ${OSG_LIB_DIR_DEBUG}/osgViewerd.lib
    
    optimized ${OSG_LIB_DIR_DEBUG}/osg.lib
    optimized ${OSG_LIB_DIR_DEBUG}/osgGA.lib
    optimized ${OSG_LIB_DIR_DEBUG}/osgDB.lib
    optimized ${OSG_LIB_DIR_DEBUG}/openThreads.lib
    optimized ${OSG_LIB_DIR_DEBUG}/osgManipulator.lib
    optimized ${OSG_LIB_DIR_DEBUG}/osgViewer.lib
)

create_file_structure(SOURCE_LIST HEADER_LIST)

add_project_to_folder(${PROJECT_NAME} "part1")
    